home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / DJDEV111.ZIP / include / unistd.h < prev    next >
C/C++ Source or Header  |  1993-09-26  |  4KB  |  152 lines

  1. /* This file may have been modified by DJ Delorie (Jan 1991).  If so,
  2. ** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave,
  3. ** Rochester NH, 03867-2954, USA.
  4. */
  5.  
  6. #ifndef unistd_h
  7. #define unistd_h 1
  8.  
  9. #include <sys/fcntl.h>
  10.  
  11. /* A safe-looking set of things from various system versions */
  12.  
  13. #ifndef    FNM_PATHNAME
  14. #define FNM_PATHNAME 1
  15. #endif
  16.  
  17. #ifndef    FNM_QUOTE
  18. #define FNM_QUOTE 2
  19. #endif
  20.  
  21. #ifndef SEEK_SET
  22. #define SEEK_SET 0
  23. #endif
  24.  
  25. #ifndef SEEK_CUR
  26. #define SEEK_CUR 1
  27. #endif
  28.  
  29. #ifndef SEEK_END
  30. #define SEEK_END 2
  31. #endif
  32.  
  33. #ifndef GF_PATH
  34. #define GF_PATH "/etc/group"
  35. #endif
  36.  
  37. #ifndef PF_PATH
  38. #define PF_PATH "/etc/passwd"
  39. #endif
  40.  
  41. #ifndef IN_PATH
  42. #define IN_PATH "/usr/include"
  43. #endif
  44.  
  45. #ifndef R_OK
  46. #define R_OK 4
  47. #endif
  48.  
  49. #ifndef W_OK
  50. #define W_OK 2
  51. #endif
  52.  
  53. #ifndef X_OK
  54. #define X_OK 1
  55. #endif
  56.  
  57. #ifndef F_OK
  58. #define F_OK 0
  59. #endif
  60.  
  61. #ifndef NULL
  62. #define NULL 0
  63. #endif
  64.  
  65. #ifndef F_ULOCK
  66. #define F_ULOCK 0
  67. #endif
  68.  
  69. #ifndef F_LOCK
  70. #define F_LOCK 1
  71. #endif
  72.  
  73. #ifndef F_TLOCK
  74. #define F_TLOCK 2
  75. #endif
  76.  
  77. #ifndef F_TEST
  78. #define F_TEST 3
  79. #endif
  80.  
  81. #ifdef    __cplusplus
  82. extern "C" {
  83. #endif
  84. extern long    sysconf(int);
  85. extern long    pathconf(const char *, int);
  86. extern long    fpathconf(int, int);
  87. #ifdef    __cplusplus
  88. }
  89. #endif
  90.  
  91. /* Miscellaneous constants */
  92. #define _POSIX_VERSION        199009L
  93. #define    _POSIX2_VERSION        198909L
  94. #define    _POSIX2_C_BIND        1    /* Not sure what this means */
  95. #define    _POSIX2_C_DEV        -1
  96. #define    _POSIX2_FORT_DEV    -1
  97. #define    _POSIX2_SW_DEV        -1
  98. #define    _XOPEN_VERSION        3
  99.  
  100. /* sysconf() values from POSIX.1 */
  101. #define    _SC_ARG_MAX        0    /* Max length of arg to exec() */
  102. #define    _SC_CHILD_MAX        1    /* Max processes per userid */
  103. #define    _SC_CLK_TCK        2    /* Number of clock ticks per second */
  104. #define    _SC_NGROUPS_MAX        3    /* Max group IDs per process */
  105. #define    _SC_OPEN_MAX        4    /* Max open files per process */
  106. #define    _SC_JOB_CONTROL        5    /* POSIX job control supported */
  107. #define    _SC_SAVED_IDS        6    /* POSIX saved IDs supported */
  108. #define    _SC_VERSION        7    /* Date of POSIX.1 */
  109. /* sysconf() values from POSIX.1-1990 */
  110. #define    _SC_STREAM_MAX        100    /* Max open stdio FILEs */
  111. #define    _SC_TZNAME_MAX        101    /* Max length of timezone name */
  112. /* sysconf() values from POSIX.2 */
  113. #define    _SC_BC_BASE_MAX        200    /* Largest ibase & obase for bc */
  114. #define    _SC_BC_DIM_MAX        201    /* Max array elements for bc */
  115. #define    _SC_BC_SCALE_MAX    202    /* Max scale value for bc */
  116. #define    _SC_COLL_ELEM_MAX    203    /* Max bytes in collation element */
  117. #define    _SC_EXPR_NEST_MAX    204    /* Max nesting of (...) for expr */
  118. #define    _SC_LINE_MAX        205    /* Max length in bytes of input line */
  119. #define    _SC_PASTE_FILES_MAX    206    /* Max file operands for paste */
  120. #define    _SC_RE_DUP_MAX        207    /* Max regular expressions permitted */
  121. #define    _SC_SED_PATTERN_MAX    208    /* Max size of bytes of sed pattern */
  122. #define    _SC_SENDTO_MAX        209    /* Max bytes of message for sendto */
  123. #define    _SC_SORT_LINE_MAX    210    /* Max bytes of input line for sort */
  124. #define    _SC_2_VERSION        211    /* Current version of POSIX.2 */
  125. #define    _SC_2_C_BIND        212    /* C Language Bindings Option */
  126. #define    _SC_2_C_DEV        213    /* C Development Utilities Option */
  127. #define    _SC_2_FORT_DEV        214    /* FORTRAN Dev. Utilities Option */
  128. #define    _SC_2_SW_DEV        215    /* Software Dev. Utilities Option */
  129. /* sysconf() values from X/Open */
  130. #define    _SC_XOPEN_VERSION    8    /* Issue of XPG */
  131. #define    _SC_PASS_MAX        9    /* Max bytes in password */
  132. #define    _SC_CLOCKS_PER_SEC    2000    /* Units/sec of clock() */
  133. /* sysconf() values from OSF */
  134. #define    _SC_AES_OS_VERSION    3000    /* Version of OSF/AES OS */
  135. #define    _SC_PAGE_SIZE        3001    /* Software page size */
  136. #define    _SC_ATEXIT_MAX        3002    /* Max atexit() funcs */
  137.  
  138. /* pathconf() values from POSIX.1 */
  139. #define    _PC_LINK_MAX        0    /* Max links to a single file */
  140. #define    _PC_MAX_CANON        1    /* Max bytes in TTY canonical input */
  141. #define    _PC_MAX_INPUT        2    /* Max bytes in TTY input queue */
  142. #define    _PC_NAME_MAX        3    /* Max bytes in a filename */
  143. #define    _PC_PATH_MAX        4    /* Max bytes in a pathname */
  144. #define    _PC_PIPE_BUF        5    /* Max bytes for atomic pipe writes */ 
  145. #define    _PC_CHOWN_RESTRICTED    6    /* Only privileged user can chown() */
  146. #define    _PC_NO_TRUNC        7    /* Error when NAME_MAX exceeded */
  147. #define    _PC_VDISABLE        8    /* Char disables TTY editing chars */
  148.  
  149. #endif
  150.  
  151.  
  152.